package com.ruoyi.uni.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单管理对象 dc_order
 * 
 * @author hx
 * @date 2024-04-18
 */
public class DcOrder extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    public DcOrder() {
    }

    private List<DcGoods> dcGoodsList;

    public List<DcGoods> getDcGoodsList() {
        return dcGoodsList;
    }

    public void setDcGoodsList(List<DcGoods> dcGoodsList) {
        this.dcGoodsList = dcGoodsList;
    }

    /** 订单号 */
    @Excel(name = "订单号")
    private String id;

    /** 用户 */
    @Excel(name = "用户")
    private Long custId;

    /** 所买商品 */
    @Excel(name = "所买商品")
    private String goodsId;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Integer status;

    /** 总价 */
    @Excel(name = "总价")
    private BigDecimal amount;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "创建订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public DcOrder(int tableId, String id, Long custId, String goodsId, Integer status, BigDecimal amount, Date createTime) {
        this.tableId=tableId;
        this.id = id;
        this.custId = custId;
        this.goodsId = goodsId;
        this.status = status;
        this.amount = amount;
        this.createTime = createTime;

    }
    private int tableId;

    public int getTableId() {
        return tableId;
    }

    public void setTableId(int tableId) {
        this.tableId = tableId;
    }

    /** 支付订单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "支付订单时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date payTime;



    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setCustId(Long custId) 
    {
        this.custId = custId;
    }

    public Long getCustId() 
    {
        return custId;
    }
    public void setGoodsId(String goodsId) 
    {
        this.goodsId = goodsId;
    }

    public String getGoodsId() 
    {
        return goodsId;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setAmount(BigDecimal amount) 
    {
        this.amount = amount;
    }

    public BigDecimal getAmount() 
    {
        return amount;
    }
    public void setPayTime(Date payTime) 
    {
        this.payTime = payTime;
    }

    public Date getPayTime() 
    {
        return payTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("custId", getCustId())
            .append("goodsId", getGoodsId())
            .append("status", getStatus())
            .append("amount", getAmount())
            .append("createTime", getCreateTime())
            .append("payTime", getPayTime())
                .append("goodsList",getDcGoodsList())
                .append("tableId",getTableId())
            .toString();
    }
}
